package com.zhanghu.backendZray.strategy.notify;

import com.zhanghu.backendZray.enums.NotifyTypeEnum;
import com.zhanghu.backendZray.pojo.entity.DailyPlan;
import com.zhanghu.backendZray.pojo.entity.NotifySetting;
import org.springframework.beans.factory.InitializingBean;

/**
 * @author ZhangDong
 * @date 2024/8/30 17:00
 */
public interface NotifyStrategy extends InitializingBean {

    boolean doNotify(DailyPlan plan, NotifySetting setting);

    NotifyTypeEnum getNotifyType();
    @Override
    default void afterPropertiesSet() {
        NotifyFactory.register(getNotifyType(), this);
    }
}
